-- GENERATED SPELL FOR [Nal'taszar] --


function spell0_4066(pUnit, Event) --@Chain Burn,n/a--
pUnit:FullCastSpellOnTarget(8211,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_4066', 3000, 1)
end

function spell1_4066(pUnit, Event) --@Chain Lightning,n/a--
pUnit:FullCastSpellOnTarget(15305,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_4066', 3000, 1)
end

function Sorts_4066(pUnit, Event)
local choix_sorts_4066 = math.random(0, 1)
if choix_sorts_4066 == 0 then
pUnit:RegisterEvent('spell0_4066', 1, 1)
end
if choix_sorts_4066 == 1 then
pUnit:RegisterEvent('spell1_4066', 1, 1)
end
end

function mob4066_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_4066', math.random(1500, 3000), 1)
end

function mob4066_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob4066_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob4066_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(4066, 1, 'mob4066_Action')
RegisterUnitEvent(4066, 2, 'mob4066_Leave')
RegisterUnitEvent(4066, 3, 'mob4066_Kill')
RegisterUnitEvent(4066, 4, 'mob4066_Die')
